import threading
import time

def print_numbers():
    for i in range(5):
        thread_name = threading.current_thread().name
        print(f"{thread_name} - Number: {i}")
        time.sleep(0.6) # 模拟处理耗时

def print_letters():
    for letter in 'abcde':
        thread_name = threading.current_thread().name
        print(f"{thread_name} - Letter: {letter}")
        time.sleep(0.4) # 模拟处理耗时

# 创建线程
t1 = threading.Thread(target=print_numbers)
t1.name = "Print Numbers"
t2 = threading.Thread(target=print_letters)
t2.name = "Print Letters"

# 启动线程
t1.start()
t2.start()

# 等待线程完成
t1.join()
t2.join()

print("所有线程执行完毕")